{extend name="web/public/base" /}
{block name="main"}
<section class="scrollable padder">
    <ul class="breadcrumb no-border no-radius b-b b-light pull-in">
        <!--<li><a><i class="fa fa-home"></i> 首页</a></li>-->
        <!--<li class="active">奖金管理</li>-->
        <li class="active">{$title}</li>
    </ul>
    <div class="row">
        {if condition="$mid eq 1"}
        <div class="col-sm-12">
            <section class="panel panel-default">
                <header class="panel-heading font-bold">{$title}</header>
                <div class="panel-body">
                    <form id="ajaxform" action="{:url('')}" role="form" method="post" onsubmit="return false;"
                          autocomplete="off">
                        <div class="row col-md-12">

                            <div class="form-group col-sm-12">
                                <label>报单及奖金基数</label>
                                报单的基数为<input type="number" name="bill_money" value="{$info.bill_money}">元，以下为奖金基数
                            </div>

                            <div class="form-group col-sm-12">
                                <label>选品区</label>
                                初级报单选品区的条件为<input type="text" name="bill_condition1" value="{$info.bill_condition1}">，
                                高级报单选品区的条件为<input type="text" name="bill_condition2" value="{$info.bill_condition2}">，
                                复消选品区的条件为<input type="text" name="cp_condition" value="{$info.cp_condition}">
                            </div>

                            <div class="form-group col-sm-12">
                                <label>{$Think.const.BONUS1}</label>
                                会员推荐其他会员购物后，他可得<input type="text" name="recom_money" value="{$info.recom_money}">元的{$Think.const.BONUS1}
                            </div>

                            <div class="form-group col-sm-12">
                                <label>{$Think.const.BONUS2}</label>
                                会员得到{$Think.const.BONUS1}，他的推荐人可得<input type="text" name="ping_rate1"
                                                                        value="{$info.ping_rate1}">%的{$Think.const.BONUS2}
                            </div>

                            <div class="form-group col-sm-12">
                                <label>{$Think.const.BONUS3}</label>
                                代理商C区增加一人，他可得<input type="text" name="point_money1" value="{$info.point_money1}">元的{$Think.const.BONUS3}
                            </div>

                            <div class="form-group col-sm-12">
                                <label>{$Think.const.BONUS8}</label>
                                代理商得到{$Think.const.BONUS3}，他代理商可得<input type="text" name="point1_leader_rate" value="{$info.point1_leader_rate}">%的{$Think.const.BONUS8}
                            </div>

                            <div class="form-group col-sm-12">
                                <label>{$Think.const.BONUS4}</label>
                                代理商C区增加一人，他可得<input type="text" name="store_money" value="{$info.store_money}">元的{$Think.const.BONUS4}
                            </div>

                            <div class="form-group col-sm-12">
                                <label>{$Think.const.BONUS5}</label>
                                代理商得到{$Think.const.BONUS4}，他的推荐人可得<input type="text" name="store_leader_money"
                                                                         value="{$info.store_leader_money}">元的{$Think.const.BONUS5}
                            </div>

                            <div class="form-group col-sm-12">
                                <label>{$Think.const.BONUS6}</label>
                                会员复购，他的代理商可得<input type="text" name="point_money2" value="{$info.point_money2}">元的{$Think.const.BONUS6}
                            </div>

                            <div class="form-group col-sm-12">
                                <label>{$Think.const.BONUS7}</label>
                                代理商得到{$Think.const.BONUS6}，他的推荐人可得<input type="text" name="ping_rate2"
                                                                         value="{$info.ping_rate2}">元的{$Think.const.BONUS7}
                            </div>

                            <div class="form-group col-sm-12">
                                <label>复购折扣</label>
                                会员复购的折扣比例为<input type="text" name="discount_rate" value="{$info.discount_rate}">%
                            </div>

                            <div class="form-group col-sm-12">
                                <label>奖金折扣</label>
                                低级别推荐高级别的折扣比例为<input type="text" name="bonus_rate" value="{$info.bonus_rate}">%
                            </div>

                            <div class="form-group col-sm-12">
                                <label>奖金税</label>
                                每笔奖金扣除<input type="text" name="tax_rate" value="{$info.tax_rate}">%的奖金税
                            </div>

                            <div class="form-group col-sm-12">
                                <label>{$Think.const.HASGREEN}</label>
                                每笔奖金扣除<input type="text" name="green_rate" value="{$info.green_rate}">%的{$Think.const.HASGREEN}
                            </div>

                            <div class="form-group col-sm-12">
                                <label>提现</label>
                                每次提现扣除<input type="text" name="fee_wd" value="{$info.fee_wd}">%手续费，最低兑换额度为<input
                                    type="text" name="min_wd" value="{$info.min_wd}">元，且必须是
                                <input type="text" name="multiple_wd" value="{$info.multiple_wd}">的倍数，提现日期为
                                每周的周<input style='width:400px;' name="wd_time" type="text" class="text"
                                           value="{$info.wd_time|default=''}"/>
                            </div>
                        </div>
                        <footer class="panel-footer text-right bg-light lter col-sm-12">
                            <input type="hidden" name="code1" value="">
                            <button type="submit" class="btn btn-success btn-s-xs" onclick="tijiaob();">提 交</button>
                        </footer>
                    </form>
                </div>
            </section>

        </div>
        {else/}
        <div style="text-align: center">级别不足，无权浏览</div>
        {/if}
    </div>
</section>
{/block}
{block name="script"}
<script type="text/javascript">
    layer.config({extend: 'extend/layer.ext.js'})
    var email = "{$email}";
    console.log(email)
    function tijiaob() {
        if (!email) {
            layer.msg("邮箱不存在")
            return false;
        }
        $.post("/index/Home/getEmailCode", {email: email}, function (data) {
            var code = data.substr(data.length - 1, 1)
            if (code == 0) {
                layer.msg('邮箱验证码发送失败！');
                return false;
            }
            layer.prompt({
                title: '请输入您的邮箱收到的验证码',
            }, function (value, index, elem) {

                var reg = new RegExp("^[0-9]{6}$");
                if (!reg.test(value)) {
                    layer.msg("请输入正确验证码")
                    return false;
                }
                $('input[name=code1]').val(value)
                ajaxSubmit();
            });
        }, 'html')
    }
</script>
{/block}
